/**
 * 
 */
package ar.com.greensoft.neosystem.model;

import javax.persistence.Cacheable;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 * 
 * @author Jorge E. Villaverde
 * @since 05/07/2013
 * @version 1.0.0
 */
@Entity
@Table(name="obra_social")
@Cacheable(value=false)
@Inheritance(strategy=InheritanceType.JOINED)
@NamedQueries({
	@NamedQuery(name=ObraSocial.FIND_BY_CUIT_QUERY_NAME, 
		query="SELECT c FROM ObraSocial c WHERE c.cuit = :cuit"),
	@NamedQuery(name=ObraSocial.FIND_BY_TIPO_NRO_DOC_QUERY_NAME, 
		query="SELECT c FROM ObraSocial c WHERE c.tipoDocumento = :tipoDocumento AND c.numeroDocumento = :numeroDocumento"),
	@NamedQuery(name=ObraSocial.FIND_BY_NAME_QUERY_NAME, 
		query="SELECT c FROM ObraSocial c WHERE c.nombre = :name"),
})
public class ObraSocial extends PersonaJuridica {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5395389873708513089L;

	public static final String FIND_BY_CUIT_QUERY_NAME = "ObraSocial.findByCuit";
	public static final String FIND_BY_TIPO_NRO_DOC_QUERY_NAME = "ObraSocial.findByTipoNumeroDocumento";
	public static final String FIND_BY_NAME_QUERY_NAME = "ObraSocial.findByName";
	
}
